﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/>
	<Style TargetType="{x:Type TabControl}">
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="Padding" Value="4,4,4,4"/>
		<Setter Property="BorderThickness" Value="1"/>
		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
		<Setter Property="Background" Value="#F9F9F9"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type TabControl}">
					<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
						<Grid.ColumnDefinitions>
							<ColumnDefinition x:Name="ColumnDefinition0"/>
							<ColumnDefinition x:Name="ColumnDefinition1" Width="0"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition x:Name="RowDefinition0" Height="*"/>
							<RowDefinition x:Name="RowDefinition1" Height="Auto"/>
						</Grid.RowDefinitions>
						<TabPanel x:Name="HeaderPanel" IsItemsHost="true" Panel.ZIndex="1" KeyboardNavigation.TabIndex="1" Grid.Column="0" Grid.Row="1" Style="{DynamicResource Tab.HeaderStyle}">
							<TabPanel.Background>
								<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
									<GradientStop Color="#FF222222" Offset="0"/>
									<GradientStop Color="#FF222222" Offset="1"/>
									<GradientStop Color="#FF181818" Offset="0.551"/>
								</LinearGradientBrush>
							</TabPanel.Background>
						</TabPanel>
						<Border x:Name="ContentPanel" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" Grid.Column="0" Grid.Row="0">
							<ContentPresenter x:Name="PART_SelectedContentHost" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" ContentSource="SelectedContent"/>
						</Border>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="Tab.HeaderStyle" TargetType="{x:Type TabPanel}"/>
	<Style TargetType="{x:Type TabItem}">
		<Setter Property="Template" Value="{DynamicResource Tab.TabItemTemplate}"/>
		<Setter Property="Foreground" Value="White"/>
	</Style>
	<ControlTemplate x:Key="Tab.TabItemTemplate" TargetType="{x:Type TabItem}">
		<Grid x:Name="grid" Height="43" Width="60">
			<Border x:Name="border" BorderBrush="{x:Null}" BorderThickness="1" CornerRadius="5" Background="#00000000" Cursor="Hand" Margin="0,0,0,2" Padding="0,0,0,2">
				<TextBlock x:Name="textBlock" Foreground="White" TextWrapping="Wrap" VerticalAlignment="Bottom" HorizontalAlignment="Center"><InlineUIContainer>
						<ContentPresenter x:Name="contentPresenter" ContentSource="Header"/>
					</InlineUIContainer></TextBlock>
			</Border>
		</Grid>
		<ControlTemplate.Triggers>
			<Trigger Property="Selector.IsSelected" Value="True">
				<Setter Property="CornerRadius" TargetName="border" Value="0,0,10,10"/>
				<Setter Property="Background" TargetName="border">
					<Setter.Value>
						<RadialGradientBrush GradientOrigin="0.509,1.676" RadiusX="0.701" RadiusY="0.701">
							<GradientStop Color="#FF222222" Offset="1"/>
							<GradientStop Color="#FF636363" Offset="0.271"/>
						</RadialGradientBrush>
					</Setter.Value>
				</Setter>
				<Setter Property="Margin" TargetName="border" Value="2,0,2,2"/>
				<Setter Property="Foreground" TargetName="textBlock" Value="White"/>
				<Setter Property="OpacityMask" TargetName="contentPresenter" Value="Black"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>
	<!-- Resource dictionary entries should be defined here. -->
</ResourceDictionary>